console.show(true);
console.clear();

let packageName = 'com.song.deviceinfo';
let path = '/data/system/users/0/settings_ssaid.xml';
let tmpPath = '/sdcard/settings_ssaid.xml';
var result = shell(`cat ${path}`, true);
console.log(`result = ${result.result}`);

let data = {
    xml : result.result,
    packageName: packageName
}

var r = http.post("http://192.168.0.103:9527/RandomAndroidId",data);
log("code = " + r.statusCode);
// log("html = " + r.body.string());
let xml = r.body.string();
log("html = " + xml);
let writePath = '/sdcard/settings_ssaid.xml';
files.write(writePath,xml);
result = shell(`mv ${writePath} ${path}`,true);

console.log(`------------after moved`);
shell(`cat ${path}`, true);

let exist = files.exists(path);
console.log(`path = ${path} exist = ${exist}`);